package com.ajz.config.activeMq;

import javax.jms.Destination;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jms.core.JmsMessagingTemplate;
import org.springframework.stereotype.Service;

@Service("provider")
public class provider {
	@Autowired
	private JmsMessagingTemplate jmsMessagingTemplate;

	/**
	 * 发送消息
	 * @param destination
	 * @param Msg
	 * @return
	 */
	public boolean sendMsg(Destination destination, final String Msg) {
		jmsMessagingTemplate.convertAndSend(destination, Msg);
		return true;
	}
}
